package chpt06;

import java.util.ArrayList;
import java.util.List;

public class College {
	private String cName;
	private List<StudentV4> allStudents;	
	// getter/setter代码
	public String getcName() {
		return cName;
	}

	public void setcName(String cName) {
		this.cName = cName;
	}
	
	public List<StudentV4> getAllStudents() {
		return allStudents;
	}

	public void setAllStudents(List<StudentV4> allStudents) {
		this.allStudents = allStudents;
	}
	// 无参构造，实例化List集合
	public College() {  
		this.allStudents = new ArrayList<StudentV4>();
	}
	
	public College(String cName) {
		this();
		this.setcName(cName);// 设置学院名称
	}
    // toString方法
	@Override
	public String toString() {
		return "学院名称： " + this.cName;
	}
}
